<!--
*Author：DGZ
 *Contact：jiduxiong@dagongzao.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/wmsproject/order/Wms_OrderTypeConf.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :details="details"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/wmsproject/order/Wms_OrderTypeConf.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        name: "Wms_OrderTypeConf",
        setup() {
            const table = ref({
                key: "OrderTypeConfId",
                footer: "Foots",
                cnName: "单据规则配置",
                name: "order/Wms_OrderTypeConf",
                newTabEdit: false,
                url: "/Wms_OrderTypeConf/",
                sortName: "OrderTypeConfId"
            });
            const editFormFields = ref({"WarehouseId":"","SnSplitRule":[],"SourseStockType":[],"DestStockType":[],"NextOrderTypeId":"","EnableIqc":"","EnableFifo":"","EnableShelfLater":"","StockoutExceedRule":"","ErpCode":"","GoodsType":"","ErpPrintApi":"","EnableApproval":""});
            const editFormOptions = ref([[{"dataKey":"WMS_Warehouse","data":[],"title":"仓库","field":"WarehouseId","colSize":12,"type":"select"}],
                              [{"dataKey":"BASE_BarcodeRule","data":[],"title":"条码解析规则","field":"SnSplitRule","type":"selectList"},
                               {"dataKey":"WMS_StockType","data":[],"title":"来源库位类型","field":"SourseStockType","type":"selectList"}],
                              [{"dataKey":"WMS_StockType","data":[],"title":"目标库位类型","field":"DestStockType","type":"selectList"},
                               {"dataKey":"WMS_OrderType","data":[],"title":"下游单据类型","field":"NextOrderTypeId","type":"select"}],
                              [{"dataKey":"enabled","data":[],"title":"是否品质检验","field":"EnableIqc","type":"switch"},
                               {"dataKey":"enabled","data":[],"title":"是否先进先出","field":"EnableFifo","type":"switch"}],
                              [{"dataKey":"enabled","data":[],"title":"先收货再上架","field":"EnableShelfLater","type":"switch"},
                               {"dataKey":"WMS_StockoutExceedRule","data":[],"title":"出库超发规则","field":"StockoutExceedRule","type":"select"}],
                              [{"title":"ErpCode","field":"ErpCode"},
                               {"dataKey":"WMS_OperationType","data":[],"title":"操作类型","field":"GoodsType","type":"select"}],
                              [{"dataKey":"enabled","data":[],"title":"是否启用审批 ","field":"EnableApproval","type":"switch"},
                               {"title":"打印模板api","field":"ErpPrintApi"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:"WarehouseId",title:"仓库",type:"bigint",bind:{ key:"WMS_Warehouse",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"OrderTypeId",title:"单据类型",type:"bigint",bind:{ key:"WMS_OrderType",data:[]},width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"OrderTypeConfId",title:"ID",type:"bigint",width:110,hidden:true,readonly:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"SnSplitRule",title:"条码解析规则",type:"string",bind:{ key:"BASE_BarcodeRule",data:[]},width:150,showOverflowTooltip:true,align:"left"},
                       {field:"SourseStockType",title:"来源库位类型",type:"string",bind:{ key:"WMS_StockType",data:[]},width:180,showOverflowTooltip:true,align:"left"},
                       {field:"DestStockType",title:"目标库位类型",type:"string",bind:{ key:"WMS_StockType",data:[]},width:180,showOverflowTooltip:true,align:"left"},
                       {field:"NextOrderTypeId",title:"下游单据类型",type:"bigint",bind:{ key:"WMS_OrderType",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"EnableIqc",title:"是否品质检验",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"EnableFifo",title:"是否先进先出",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"EnableShelfLater",title:"先收货再上架",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"StockoutExceedRule",title:"出库超发规则",type:"int",bind:{ key:"WMS_StockoutExceedRule",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ErpCode",title:"ErpCode",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"ErpPrintApi",title:"打印模板api",type:"string",width:120,showOverflowTooltip:true,align:"left"},
                       {field:"GoodsType",title:"操作类型",type:"int",bind:{ key:"WMS_OperationType",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"EnableApproval",title:"是否启用审批 ",type:"int",bind:{ key:"enabled",data:[]},width:110,showOverflowTooltip:true,align:"left"},
                       {field:"Remarks",title:"备注",type:"string",width:150,showOverflowTooltip:true,align:"left"},
                       {field:"IsValid",title:"是否有效",type:"int",width:110,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"CreateId",title:"创建用户",type:"bigint",width:80,hidden:true,require:true,showOverflowTooltip:true,align:"left"},
                       {field:"Creator",title:"创建人",type:"string",width:100,showOverflowTooltip:true,align:"left"},
                       {field:"CreateTime",title:"创建时间",type:"datetime",width:110,showOverflowTooltip:true,align:"left"},
                       {field:"ModifyId",title:"修改用户",type:"bigint",width:80,hidden:true,showOverflowTooltip:true,align:"left"},
                       {field:"Modifier",title:"修改人",type:"string",width:100,showOverflowTooltip:true,align:"left"}]);
            const detail = ref({columns:[]});
            const details = ref([]);
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
                details
            };
        },
    });
</script>
